import request from '@/utils/request'
import linq from 'linq'
export async function getXxhjsgk(XXID,CJPC){
    //
    
    let res =  await request({
        url: `/Xxhjsgks?$filter=XXID eq '${XXID}' and CJPC eq '${CJPC}'`,
        method: 'get',
      })
    return res.data.value;
    //
    
}

export async function bulkAddXxhjsgk(data){
  //
  
  let res =  await request({
      url: '/Xxhjsgks/BulkAddXxhjsgk',
      method: 'post',
      data:data
    })
  return res.data.value;
  //
  
}
export async function updateXxhjsgk(model){
    let res =  await request({
        url: `/Xxhjsgks(${model.ID})`,
        method: 'put',
        data: model
      })
      return res.data;
}
export async function deleteXxhjsgk(model){
    let res = await  request({
        url: `/Xxhjsgks/${model.ID}`,
        method: 'delete',
      })
      return res.data;
}
export async function addXxhjsgk(model){
   
    let res =  await request({
      url: '/Xxhjsgks',
      method: 'post',
      data: model,
    })
    return res.data;
}